<?php

use Illuminate\Routing\Router;

Admin::routes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
    'as'            => config('admin.route.prefix') . '.',
], function (Router $router) {

    $router->get('/', function() {
        return redirect('admin/banners');
    })->name('home');

    $router->get('api/users', 'UserController@users');

    $router->resource('users', UserController::class);

    $router->resource('projects', ProjectController::class);
    $router->resource('rents', RentController::class);
    $router->resource('offers', OfferController::class);
    $router->resource('recruitments', RecruitmentController::class);
    $router->resource('jobhutings', JobhutingController::class);

    $router->resource('advertisings', AdverstingController::class);

    $router->resource('banners', BannerController::class);

    $router->resource('positions', PositionController::class);

    $router->resource('resumes', ResumeController::class);

    $router->resource('coupons', CouponController::class);

    $router->resource('contents', ContentController::class);

});
